<?php
	require_once './controller/placeController.php';
	require_once 'webView.php';
	$result = getTopPlaceController();
	if(is_array($result)){
		$stt = 1;
		foreach ($result as $key => $value){
				if($stt==1){
					echo"<div class='col-md-6 bordernone'>";
					echo "<div class='placename'><a href='#' >".$stt.". ".$value[0]->place_name."</a></div>";
					printStar($value['total_comment'],1);
					echo "<img src='".$value[0]->url_image."' style='margin-top: 10px;' width='110' height='110'>";
					echo "<div class='description' >".$value[0]->description."</div>";
					echo"</div>";
				}
				else{
					if($stt==2)
						echo"<div class='col-md-6 bordernone'>";
                    echo "<div class='placetop-rightcontainer'>";
                    echo "<img src='".$value[0]->url_image."' width='70' height='70'>";
                    echo "<div class='placename rightcontainer'><a href='#' >".$stt.".".$value[0]->place_name."</a></div>";
                    printStar($value['total_comment'],5);
                    echo "</div>";
                    if($stt<5){
                        echo "<hr style='margin-left: 7px; margin-right: 7px;margin-top: 0px;margin-bottom: 10px;'>";
					}
                    else{
                        echo"</div>";
                    }  
				}
				$stt++;
			//}
			
		}
	}
?>